function add(x, y, z) {
    return x + y + z
}

function curry(fn, a) {
    return function (b) {
        return function (c) {
            return fn.call(this, a, b, c)
        }
    }
}
console.log(curry(add, 1)(2)(3) === add(1, 2, 3))